import { _decorator, Asset } from 'cc';

const { ccclass } = _decorator;

@ccclass('NNModel')
export default class NNModel extends Asset {

    /** Bytes backing field. */
    private _bytes!: ArrayBuffer;

    /** Raw moc bytes. */
    public get bytes() {
        return this._bytes;
    }
    private set bytes(value) {
        this._bytes = value;
    }

    /** Raw moc bytes. */
    public get _nativeAsset(): ArrayBuffer {
        return this._bytes;
    }
    private set _nativeAsset(value: ArrayBuffer) {
        this._bytes = value;
    }

    public validate() {
        return !!this._bytes;
    }
}

